nested vmx: fix CR0/CR4 emulation
authorDongxiao Xu <dongxiao.xu@intel.com>
Fri, 11 Jan 2013 16:30:56 +0000 (17:30 +0100)
committerDongxiao Xu <dongxiao.xu@intel.com>
Fri, 11 Jan 2013 16:30:56 +0000 (17:30 +0100)
commita83a8aa0291ffa27a74938d28c7fb7b07a0a303a
tree65bb54a09f41512df0a4170fd38f7389870e635b
parent17ef427485fde825bb8f9a6373e2471e0882290b
nested vmx: fix CR0/CR4 emulation

While emulate CR0 and CR4 for nested virtualization, set the CR0/CR4
guest host mask to 0xffffffff in shadow VMCS, then calculate the
corresponding read shadow separately for CR0 and CR4. While getting
the VM exit for CR0/CR4 access, check if L1 VMM owns the bit. If so,
inject the VM exit to L1 VMM. Otherwise, L0 will handle it and sync
the value to L1 virtual VMCS.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmx/vvmx.c